<template>
  <div class="agree-box">
    <div class="content">
      <text space="nbsp" v-html="agreement"></text>
    </div>
  </div>
</template>

<script>
  import { getEnterpriseAgreement } from '@/api/common'
  export default {
    data() {
      return {
        agreement: {}
      }
    },
    onLoad() {
      // 初始化data
      Object.assign(this.$data, this.$options.data())
    },
    onShow() {
      this.agreementEls()
    },
    mounted() {
      setTimeout(() => {
        this.agreementEls()
      }, 100)
    },
    methods: {
      agreementEls() {
        getEnterpriseAgreement({
          type: 1
        }).then((response) => {
          if (response.isError) return
          this.agreement = response.data.content
        }).catch(() => {
        })
      }
    }
  }
</script>

<style lang="less" scoped>
  .agree-box {
    min-height: calc(100vh);
    background-color: #fff;
    overflow: hidden; 
    .content{ 
      padding: 15px;
    }
  }
</style>
